<?php
// +----------------------------------------------------------------------
// | 海豚PHP框架 [ DolphinPHP ]
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 河源市卓锐科技有限公司 [ http://www.zrthink.com ]
// +----------------------------------------------------------------------
// | 官方网站: http://dolphinphp.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------

    namespace app\index\controller;

    use app\admin\model\Module;
    use think\Db;


    /**
     * 前台首页控制器
     * @package app\index\controller
     */
    class Index extends Home
    {
        public function index()
        {
            if (is_swoole()) {
                $this->redirect('/admin/swoole/index');
            }

            if (request()->baseFile() == '/admin.php') {
                $this->redirect('/admin.php/admin/index/index');
            }

            // 默认跳转模块
            if (config('home_default_module') != 'index') {
                $this->redirect(config('home_default_module') . '/index/index/index');
            }

        }

        public function test()
        {
        }
    }

